<template>
  <div class="fixed bottom-0 left-0 w-screen px-4 bg-white dark:bg-black">
    <el-pagination
      layout="total, prev, pager, next"
      :total="viewStore.total"
      :page-size="20"
      @current-change="load()"
      class="flex"
    />
  </div>
</template>

<script setup>
import useViewStore from '@/stores/view.js'
// import { useRoute, useRouter } from 'vue-router'
const viewStore = useViewStore()
// const router = useRouter()

const load = (page) => {
  // v-model:current-page="viewStore.page"
  viewStore.setPage(page)
  viewStore.load()
}
</script>
